package com.jyl.gateway;

import com.jyl.gateway.kit.ServerListListener;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.context.annotation.ComponentScan;

@SpringCloudApplication
@ComponentScan(basePackages = {"com.jyl.gateway"})
public class GatewayApplication implements CommandLineRunner {



    public static void main(String[] args) {
        SpringApplication.run(GatewayApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        Thread thread = new Thread(new ServerListListener());
        thread.setDaemon(true);
        thread.start();
    }
}
